<template>
    <el-container class="home-container">
      <!-- 头部 -->
  <el-header>
    <div class="logo">
      <img src="../assets/heima.png" alt="">
      <span>电商后台管理系统</span>
    </div>
    <el-button type="info" plain @click="exit">退出</el-button>
  </el-header>
  <!-- 下方 -->
  <el-container >
    <!-- 左侧 -->
    <el-aside width="200px">
       <el-menu
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b">
      <el-submenu index="1">
        <template slot="title">
          <i class="el-icon-location"></i>
          <span>导航一</span>
        </template>
        <el-menu-item-group index="1-1">
          <template slot="title">
          <i class="el-icon-location"></i>
          <span>导航一</span>
        </template>
        </el-menu-item-group>
        </el-submenu>
    </el-menu>
    </el-aside>
    <el-main>Main</el-main>
  </el-container>
</el-container>
</template>

<script>
export default {
  methods: {
    exit () {
      sessionStorage.clear()
      // sessionStorage.setItem('token', '')
      this.$router.push('/login')
    }
  },
  created () {
    console.log(1)
  }
}
</script>

<style lang="less" scoped>
.el-header {
  display: flex;
  justify-content: space-between;
  background-color: #363c42;
  color: #fff;
  font-size: 20px;
  >div {
    display: flex;
    align-items: center;
    >span {
      padding-left: 10px;
    }
  }
}
.el-aside {
  background-color: #313743;
}
.el-main {
  background-color: #e9edf1;
}
.home-container {
  height: 100%;
}
.icof {
  margin-left:10px ;
}
.openClose {
    background-color: #4a5064;
    color: #fff;
    font-size: 12px;
    text-align: center;
    line-height: 22px;
    cursor: pointer;
    letter-spacing: .12em;

}
.el-menu {
  border-right: none;
}
</style>
